package com.woniuxy.main.service.impl;

import com.woniuxy.main.mapper.UserMapper;
import com.woniuxy.main.pojo.User;
import com.woniuxy.main.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @author Su
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public List<User> findAll() throws Exception {
        return userMapper.findAll();
    }

    @Override
    public User findById(Integer user_id) throws Exception {
        return userMapper.findById(user_id);
    }
}
